package com.banmao.mall.mapper;

import com.banmao.mall.model.pojo.Permission;
import com.banmao.mall.model.vo.admin.system.ChildrenBean;
import com.banmao.mall.model.vo.admin.system.ChildrenBeanX;
import com.banmao.mall.model.vo.admin.system.SystemPermissionsBean;

import java.util.Date;
import java.util.List;

public interface PermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

    List<String> selectPermissionListByRoleId(Integer roleId);

    List<SystemPermissionsBean> selectPermissionsList();

    List<ChildrenBeanX> selectPermissionsChildrenListBySid(Integer sid);

    List<ChildrenBean> selectPermissionsChildrenDetailsListByCid(Integer cid);

    List<String> selectId();

    void updateDeletedByRoleIdAndPermission(Integer roleId, String proto, Date date);

    String selectApiByPermission(String permission);


    Permission selectListByRoleId(String roleId);

}